home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Internet / Info / Internet Roadmap.sit / Internet Roadmap ƒ / Map 15 Ftpmail↵ < prev    next >
Encoding:
Text File  |  1995-02-14  |  10.1 KB  |  284 lines  |  [ttro/ttxt]

  1. MAP15: FTPMAIL
  2. --------------
  3.  
  4.      "The whole of science is nothing more than a refinement of
  5.       everyday thinking." -- Albert Einstein, Out of My Later Years
  6.  
  7.  
  8. Before we get to ftpmail, there are a few other things that I
  9. want to discuss.
  10.  
  11. Yesterday I showed you how to retrieve a text file using FTP.
  12. But how can a text file written on an IBM be read on an Apple
  13. Macintosh or on a Unix workstation? Its easy -- thanks to something
  14. called ASCII.
  15.  
  16. ASCII is the American Standard Code for Information Interchange,
  17. and it is the standard format for transmitting textual data.
  18. *Any* computer can read an ASCII text file. Without going too
  19. in-depth into how ASCII works, let's just say that ASCII ensures
  20. that the text in an ASCII text file will appear the same on any
  21. computer regardless of the computer's brand name or operating
  22. system.
  23.  
  24. ASCII is fine and dandy for saving and transferring text files,
  25. but it won't work with non-text, data files -- like computer
  26. programs. Data files must be saved in "Binary" (which is just
  27. a bunch of zeros and ones).
  28.  
  29. Binary files are files that can only run on certain machines
  30. or programs. Good examples of Binary files include shareware
  31. software, Microsoft Word files, Microsoft Powerpoint presentations,
  32. satellite weather images, and sound files.
  33.  
  34. Remember, ASCII files are just 'plain' text files that can be
  35. read on any computer, and Binary files are files that can only
  36. be run on certain computers or programs.
  37.  
  38.  
  39. Unfortunately, there is no universal default transfer mode
  40. for FTP clients. Some clients use ASCII as the default, and
  41. others use binary. This means that unless you tell your FTP
  42. client to do otherwise, all of your files will be transferred
  43. in the default transfer mode.
  44.  
  45. If your client's default transfer mode is ASCII and you try to
  46. retrieve a Binary file without first resetting the transfer mode,
  47. your Binary file will be transferred in ASCII and the file *WILL
  48. NOT WORK* once you get it.
  49.  
  50. Fortunately, changing the transfer mode in FTP is easy. All that
  51. most of you have to do to change the FTP transfer mode from ASCII
  52. to Binary is type
  53.  
  54.           binary
  55.  
  56. right before you get the file, and the file will be transferred to
  57. you in Binary format.
  58.  
  59. To change back to ASCII transfer mode, just type
  60.  
  61.           ascii
  62.  
  63. and FTP will reset its transfer mode to ASCII.
  64.  
  65. If you ever forget what transfer mode you are currently using --
  66. something that I do *ALL* of the time -- all you need to do is
  67. type
  68.  
  69.           status
  70.  
  71. and your computer will display a whole bunch of information,
  72. including your transfer mode :)
  73.  
  74. BTW, how can you tell if a file is an ASCII file or a Binary
  75. file? Well, take a look at the extensions (remember, an extension
  76. is the stuff at the end of the file name -- the extension for
  77. CRISPEN.DOC is .DOC; the extension for SQUIRREL.TXT is .TXT).
  78. If the file's extension is .doc or .txt, or if the file does
  79. not have an extension, it is a good bet that the file is an
  80. ASCII text file. If the file has a weird extension -- like .gif
  81. or .zip -- it is a good bet that the file is a Binary file.
  82. There are, of course, always exceptions to this rule.
  83.  
  84. The "duck theory" also works pretty well in determining if a
  85. file is an ASCII or Binary file. The duck theory says that if
  86. it looks like a duck, waddles like a duck, swims like a duck,
  87. quacks like a duck, and is seen hanging around with other
  88. ducks ... it is probably a duck.
  89.  
  90. Using the duck theory to determine if a file is an ASCII or
  91. Binary file, you can safely assume that if you have a file that
  92. looks like a ASCII text file and is seen in the same directory
  93. as other ASCII text files, you can safely assume that the file
  94. that you are looking at is, in reality, a DUCK :)
  95.  
  96. (First squirrels ... now ducks ... this workshop is getting to me)
  97.  
  98.  
  99. MULTIPLE FILE TRANSFERS:
  100.  
  101.  
  102. How can you transfer multiple files at the same time? Simple! Use
  103. the "mget" (multiple get) command!
  104.  
  105. Let's say that I want to get every file in a particular directory
  106. with the word "duck" in it. I would type
  107.  
  108.           mget duck*
  109.  
  110. The * (a.k.a. "splat") is a "wild card" that tells the client to
  111. get every file that begins with the word "duck" and that has
  112. any additional characters after the word "duck".
  113.  
  114. The best way to explain wildcards is to give you an example. Let's
  115. pretend that I have a directory with the following files in it:
  116.  
  117.      duckreport.doc          ducket.exe
  118.      duck1.txt               duck2.txt
  119.      ducksoup                duck.gif
  120.  
  121. Where I place the wildcard in my mget command will determine
  122. what files I get:
  123.  
  124.      mget command:         files it would retrieve:
  125.  
  126.      mget duck*            duckreport.doc; ducket.exe; duck1.txt;
  127.                            duck2.txt; ducksoup; duck.gif
  128.      mget duck*.txt        duck1.txt; duck2.txt
  129.      mget duck.*           duck.gif
  130.  
  131. Before you continue on, take a minute and try to figure out why
  132. each of the mget commands retrieved different files. If you can
  133. figure it out -- and believe me folks, this is EASY -- you will
  134. be a master of the mget command :)
  135.  
  136.  
  137. FTPMAIL:
  138.  
  139.  
  140. If your local Internet service provider does not have an FTP
  141. client, you can still get FTP files by using a tool called
  142. ftpmail!
  143.  
  144. The steps in a basic ftpmail session are pretty easy:
  145.  
  146.      1. Write an e-mail letter to an ftpmail site near
  147.         you, and put the necessary ftpmail commands
  148.         in the BODY of your letter.
  149.      2. The ftpmail site will write you back and tell you that
  150.         it has received your request, and will tell you the
  151.         number of requests ahead of yours (I still think that
  152.         the number that they give you is just a random, large
  153.         number (but I am probably mistaken)).
  154.      3. A day or two later -- yes, I said "day" -- the ftpmail
  155.         system will e-mail you the file that you requested.
  156.         The ftpmail system will also send you a copy of the
  157.         "transaction" as it occurred between ftpmail and the
  158.         remote FTP site (this transaction will look a lot
  159.         like the examples in yesterday's lesson).
  160.  
  161. Today, I am going to show you how to get ASCII text files using
  162. ftpmail. We'll talk about Binary files tomorrow.
  163.  
  164. The first step is finding an ftpmail site near you. ftpmail
  165. was developed at the Digital Western Research Laboratory, and
  166. their ftpmail address -- ftpmail@decwrl.dec.com -- is the most
  167. widely known (and widely used) ftpmail address in the world.
  168. Unfortunately, because of the traffic that this site sees, the
  169. decwrl address is also sometimes the slowest ftpmail site in
  170. the world :(   <--- a frowning smiley
  171.  
  172. There are other ftpmail servers around the world that may be
  173. closer to you, and that may actually be faster that the decwrl
  174. address:
  175.  
  176.           Australia      ftpmail@cs.uow.edu.au
  177.           France         ftpmail@grasp.insa-lyon.fr
  178.           Germany        ftpmail@ftp.uni-stuttgart.de
  179.           Great Britain  ftpmail@doc.ic.ac.uk
  180.           Ireland        ftpmail@ieunet.ie
  181.           Sweden         ftpmail@lth.se
  182.           USA            ftpmail@sunsite.unc.edu
  183.           USA            ftpmail@ftp.uu.net
  184.           USA            ftpmail@decwrl.dec.com
  185.  
  186. Once you have found a site closest to you, you are ready to start
  187. sending commands to the ftpmail address! The commands, just like
  188. all of the LISTSERV commands that I drilled into your head earlier
  189. in the workshop, need to be in the BODY of your e-mail letter.
  190.  
  191. The body of you letter to the ftpmail site will actually have SEVERAL
  192. commands in it. The basic FTPmail commands are, in order:
  193.  
  194.        reply <your Internet address>
  195.           This tells ftpmail where to send the file(s) to.
  196.  
  197.        connect <ftp site address>
  198.           This tells ftpmail the site that you want it to
  199.           connect to.
  200.  
  201.        <transfer mode>
  202.           This tells ftpmail if you want the files in ASCII or
  203.           binary
  204.  
  205.        chdir <directory>
  206.           This tells ftpmail in which directory the file that we want
  207.           is located.
  208.  
  209.        get <filename>
  210.           This tells ftpmail to get a specific file.
  211.  
  212.        quit
  213.           Ends the ftpmail session
  214.  
  215. Yesterday, we ftp'd to ftp.sura.net, got into the /pub/articles
  216. directory, and got the file fall91.issue
  217.  
  218. To do this using ftpmail, I need to send an e-mail a letter to
  219. ftpmail@sunsite.unc.edu (or to any other ftpmail site), and the
  220. body of my letter would look like this:
  221.  
  222.           reply pcrispe1@ua1vm.ua.edu
  223.           connect ftp.sura.net
  224.           ascii
  225.           chdir /pub/articles
  226.           get fall91.issue
  227.           quit
  228.  
  229. NOTE: IF YOU SEND THIS TO AN FTPMAIL SITE WITHOUT CHANGING THE
  230. REPLY-TO ADDRESS, THE FTPMAIL SITE WILL SEND THE FILE TO *ME*,
  231. NOT TO YOU. PLEASE CHANGE THE REPLY TO ADDRESS :)
  232.  
  233. A day or two after I send this letter to the ftpmail address,
  234. I should see the file sitting in my e-mail box. Notice that I
  235. said "should." The traffic at the various ftpmail sites is
  236. often incredible, and sometimes requests get lost. If this
  237. happens to you, you should just send your request again :)
  238.  
  239. By the way, the "dir" command works just as well in ftpmail as
  240. it does in regular FTP! All you have to do is add the command
  241. "dir" after the "chdir" command:
  242.  
  243.           reply pcrispe1@ua1vm.ua.edu
  244.           connect ftp.sura.net
  245.           ascii
  246.           chdir /pub/articles
  247.           dir
  248.           quit
  249.  
  250.  
  251. TOMORROW:  - FTP File Compression/Decompression
  252.            - Binary files via ftpmail
  253.            - A few more ftpmail commands (ie. chunksize).
  254.  
  255. HOMEWORK:
  256.  
  257.      1. If you do not have FTP access through your local
  258.         Internet service provider,
  259.  
  260.         a. find the address of the nearest ftpmail site
  261.            from the list above
  262.         b. send a letter to that ftpmail site with the word
  263.            HELP in the body of your letter
  264.         c. ask your local Internet service provider if
  265.            they have any size limits on messages to and
  266.            from the Internet.
  267.  
  268.      2. If you *do* have FTP access through your local Internet
  269.         service provider, make sure that you
  270.  
  271.         a. know how to access your FTP client
  272.         b. know the commands that your client allows
  273.         c. review MAP13 and MAP14
  274.  
  275.  
  276.    PATRICK DOUGLAS CRISPEN    THE VIEWS EXPRESSED IN THIS LETTER DO NOT
  277.     PCRISPE1@UA1VM.UA.EDU      NECESSARILY REPRESENT THE VIEWS OF THE
  278.   THE UNIVERSITY OF ALABAMA      UNIVERSITY OF ALABAMA - TUSCALOOSA
  279.  
  280.       ROADMAP: COPYRIGHT PATRICK CRISPEN 1994. ALL RIGHTS RESERVED.
  281.  
  282.  
  283.  
  284.